package com.zebra.remoting.protocol;

import com.zebra.common.ZebraBaseMessage;
import lombok.*;

@Data
@ToString
@EqualsAndHashCode(of = {"cmd"})
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CommandModel {
    private int cmd;
    private ProcessorType processorType;
    private PoolType poolType;
    private boolean verifyType;
    private CommandType commandType;
    private ZebraBaseMessage request;

    public CommandProfile toProfile(){
        return CommandProfile.builder()
                .cmd(this.cmd)
                .poolType(this.poolType.value())
                .processorType(this.processorType.value())
                .verifyType(this.verifyType)
                .commandType(this.commandType.value())
                .build();
    }
}
